import axios from 'axios'

export function getComments(param) {
  const url = '/api/bg/getComments'
  const data = param
  return axios.post(url, data).then((res) => {
    return Promise.resolve(res.data)
  })
}

export function addComment(param) {
  console.log(param)
  const url = '/api/bg/comment'
  const data = param
  return axios.post(url, data).then((res) => {
    return Promise.resolve(res.data)
  })
}
export function addReply(param) {
  console.log(param)
  const url = '/api/bg/reply'
  const data = param
  return axios.post(url, data).then((res) => {
    return Promise.resolve(res.data)
  })
}